package xinxin.com.BuilderPatternBasic;

import xinxin.com.BuilderPatternBasic.Builder.Builder;
import xinxin.com.BuilderPatternBasic.Builder.ConcreteBuilder.ConcreteBuilder1;
import xinxin.com.BuilderPatternBasic.Builder.ConcreteBuilder.ConcreteBuilder2;
import xinxin.com.BuilderPatternBasic.Director.Director;
import xinxin.com.BuilderPatternBasic.Product.Product;

/**
 * @author ：史鑫鑫
 * @date ：Created in 2019/3/25 20:03
 */
public class BuilderPatternBasic {
    public static void main(String[] args) {
        Director director = new Director();
        Builder builder1 = new ConcreteBuilder1();
        Builder builder2 = new ConcreteBuilder2();

        director.Construct(builder1);
        Product product1 = builder1.GetResult();
        product1.Show();

        director.Construct(builder2);
        Product product2 = builder2.GetResult();
        product2.Show();
    }
}
